From: Julian Sparber Date: Mon, 12 Feb 2024 09:16:36 +0000 (+0100) Subject: messageTray: Drop createBanner() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~1^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=83ea818a0a5030141fb17878a576cefb001d9e9c;p=gnome-shell.git messageTray: Drop createBanner() This removes the `createBanner()` method on `Notification` and `Source`. Since we want to use the same widget for the calendar and the banner, let's not allow to create custom widgets just for the banner. Part-of: --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 48731367a..823b7b9ab 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -555,15 +555,6 @@ export const Notification = GObject.registerClass({ this.sound?.play(this.title); } - // Allow customizing the banner UI: - // the default implementation defers the creation to - // the source (which will create a NotificationBanner), - // so customization can be done by subclassing either - // Notification or Source - createBanner() { - return this.source.createBanner(this); - } - activate() { this.emit('activated'); @@ -664,10 +655,6 @@ export const Source = GObject.registerClass({ : PrivacyScope.USER; } - createBanner(notification) { - return new NotificationBanner(notification); - } - _onNotificationDestroy(notification) { let index = this.notifications.indexOf(notification); if (index < 0) @@ -1160,7 +1147,7 @@ export const MessageTray = GObject.registerClass({ this.idleMonitor.add_user_active_watch(this._onIdleMonitorBecameActive.bind(this)); } - this._banner = this._notification.createBanner(); + this._banner = new NotificationBanner(this._notification); this._banner.connectObject('done-displaying', this._escapeTray.bind(this), this); this._bannerBin.add_child(this._banner);